//
//  KuWeiUtils.m
//  CarTown
//
//  Created by xionghao on 15/9/8.
//  Copyright (c) 2015年 熊浩. All rights reserved.
//

#import "KuWeiUtils.h"
#import "Position.h"
@implementation KuWeiUtils
+(void)getKuWei:(void (^)(bool))su{
    NSMutableDictionary *params=[NSMutableDictionary dictionary];
    params[@"action"]=@"position";
    [PostUitls Post:qburl parameters:params success:^(id response) {
       
        NSDictionary *dict=response;
        
        NSNumber *state=dict[@"state"];
        
        if ([state integerValue]==400) {
            [Position addPostion:dict[@"data"]];
        }
        if (su) {
            su(YES);
        }
        
    } failure:^(NSError *error) {
        if (su) {
            su(NO);
        }
    }];
}
@end
